package cn.springcloudtest.client;

import cn.springcloudtest.fallback.LogClientFallback;
import cn.springcloudtest.pojo.Log;
import cn.springcloudtest.utils.Page;
import org.springframework.cloud.openfeign.FeignClient;

import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName:springcloud-common-api
 * @Author:赵伟杰
 * @Date:2021年09月05日 10:36
 */
@FeignClient(name = "springcloud-log-provider", fallback = LogClientFallback.class)
public interface LogClient {

    @RequestMapping("/local/getLogById")
    public Log getLogById(@RequestParam Integer id) throws Exception;

    @RequestMapping("/local/getLogListByMap")
    public List<Log> getLogListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping("/local/getLogCountByMap")
    public Integer getLogCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping("/local/AddLog")
    public Integer addLog(@RequestBody Log log) throws Exception;

    @RequestMapping("/local/ModifyLog")
    public Integer modifyLog(@RequestBody Log log) throws Exception;

    @RequestMapping("/local/DeleteLogById")
    public Integer deleteLogById(@RequestParam Integer id) throws Exception;

    @RequestMapping("/local/queryLogPageByMap")
    public Page<Log> queryLogPageByMap(@RequestBody Map<String, Object> param) throws Exception;

}
